import Vue from 'vue'
import VueRouter from 'vue-router'

import Home from '../views/home/Home.vue'
import Layout from '../layout/Layout.vue'
import Login from '../views/Login.vue'

import Class from '../views/ClassManage/ClassManage'

// import finance from '../views/finance/Financial.vue'

import Course from '../views/ClassManage/ClassManage.vue'
import Student from '../views/student/Student.vue'

import Order from '../views/order/order.vue'

import Finance from '../views/finance/Financial.vue'
import Teacher from '../views/teacher/Teacher.vue'
import InterCalate from '../views/InterCalate.vue'




Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect:'/layout/home'
  },
  {
    path:'/layout', //布局路由
    name:'Layout',
    component:Layout,
    children:[
      {
        path: 'home', //首页
        name: 'Home',
        component: Home
      },

      {
        path:'class',
        name:'Class',
        component:Class
      },


  {
        path: 'course', //课程
        name: 'Course',
        component: Course
      },
      {
        path: 'finance', //财务
        name: 'Finance',
        component: Finance
      },
      {
        path: 'order', //订单
        name: 'Order',
        component: Order
      },
      {
        path: 'student', //学员
        name: 'Student',
        component: Student
      },
      {
        path: 'teacher', //教师
        name: 'Teacher',
        component: Teacher
      },
      {
        path: 'intercalate', //设置
        name: 'InterCalate',
        component: InterCalate
      }

    ]
  },
  {
    path:'/login',
    name:'Login',
    component:Login
  }
  
]

const router = new VueRouter({
  routes
})

export default router
